<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <% if(user){ %>
    <nav>
        <h3><%=user.loginname%> 已登陆</h3>
        <a href="/users/logout">退出</a>
    </nav>
    <br><br>
    <form class="message" action="/users/refresh" method="post">
      <span name="loginname"><%=user.loginname%></span>
      <input type="text" name="text" placeholder="留言" value="">
      <input type="submit" name="" value="提交">
    </form>
    <%}else{%>
      <h3>登陆</h3>
    <form class="" action="/users/login" method="post">
      <input type="text" name="loginname" placeholder="用户名" value="">
      <br>
      <input type="password" name="password" placeholder="密码" value="">
      <br>
      <%= firstnum %> +<%= secondnum %> = <input type="text" name="vnum">
      <br>
      <input type="submit" name="" value="登陆">
    </form>
    <br><br>
    <h3>注册</h3>
    <form class="" action="/users/reg" method="post">
      <input type="text" name="loginname" placeholder="用户名" value="">
      <br>
      <input type="password" name="password" placeholder="密码" value="">
      <br>
      <input type="password" name="confirm" placeholder="再次输入密码" value="">
      <br>
      <%= thirdnum %> +<%= fourthnum %> = <input type="text" name="xnum">
      <br>
      <input type="submit" name="" value="注册">
    </form>
    <%}%>
    <h3>留言板</h3>
    <pre><%=speak%></pre>  
  </body>
</html>
